import { defineConfig } from '@umijs/max';
/**
 * layout 是否开始布局，true，则相当于放入了<OutLook/>内被当做children了
 */
export default defineConfig({
  history: {
    type: 'hash',
  },
  routes: [
    {
      path: '/',
      redirect: '/login',
    },
    {
      name: '登录',
      path: '/login',
      component: '@/pages/Login',
      layout: false,
    },
    {
      name: '首页',
      path: '/home',
      component: '@/pages/Home',
    },
    {
      name: '权限演示',
      path: '/access',
      component: '@/pages/Access',
    },
    {
      name: ' CRUD 示例',
      path: '/table',
      component: '@/pages/Table',
      routes: [
        {
          name: '子菜单',
          path: '/table/table',
          component: '@/pages/Table',
        },
      ],
    },
  ],
});
